package ar.edu.unicen.exa.isistan.archassis.view.dialogs;

import java.util.List;
import java.util.concurrent.Callable;

import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Shell;

import ar.edu.unicen.exa.isistan.archassis.rcs.IVersion;
import ar.edu.unicen.exa.isistan.archassis.rcs.svn.SVNRevisionControlSystem;

public class GetVersionsWorkingDialog extends AbstractWorkingDialog<List<IVersion>> {
	private SVNRevisionControlSystem rcs;
	public GetVersionsWorkingDialog(Shell parent, SVNRevisionControlSystem rcs) {
		super(parent, SWT.BORDER);
		this.rcs = rcs;
	}

	@Override
	protected Callable<List<IVersion>> createCallable() {
		return new Callable<List<IVersion>>() {
			
			@Override
			public List<IVersion> call() throws Exception {
				return rcs.getWorkingVersions();
			}
		};
	}

	@Override
	protected String getTextInfo() {
		return "Obteniendo versiones";
	}

}
